package durst.data.dao;

import java.sql.SQLException;

import com.j256.ormlite.dao.Dao;
import com.j256.ormlite.dao.DaoManager;
import com.j256.ormlite.support.ConnectionSource;

public abstract class DaoFactory extends DaoManager {
	private static DaoFactory instance = new MysqlDaoFactory();

	public static void setInstance(DaoFactory inst) {
		instance = inst;
	}

	public static DaoFactory getInstance() {
		return instance;
	} 
	
	public abstract ConnectionSource getConnectionSource();
	public abstract <D extends Dao<T,?>,T> D createDao(Class<T> clazz) throws SQLException;
}
